var usernameInput = document.getElementsByClassName('username')[0]
var passwordInput = document.getElementsByClassName('password')[0]
var login = document.getElementsByClassName('login')[0]

login.addEventListener('click', function() {
    var username = usernameInput.value
    var password = passwordInput.value
    myAjax('POST', '/login', { username, password }).then((result) => {
        alert(result)
        location.href = 'home.html'
    })
})